import socket

def send_ssdp_request(target_ip, attack_type):
    SSDP_MSEARCH = (
        'M-SEARCH * HTTP/1.1\r\n' +
        'HOST: {target_ip}:1900\r\n' +
        'MAN: "ssdp:discover"\r\n' +
        'MX: 2\r\n' +
        'ST: {attack_type}\r\n' +
        '\r\n'
    )

    with socket.socket(socket.AF_INET, socket.SOCK_DGRAM) as s:
        s.sendto(SSDP_MSEARCH.format(target_ip=target_ip, attack_type=attack_type).encode(), (target_ip, 1900))

target_ip = input("Please enter the target IP address: ")
attack_type = input("Please enter the attack type (e.g., ssdp:all): ")

send_ssdp_request(target_ip, attack_type)